package com.itheima.mapper;

import com.itheima.pojo.PetService;
import org.apache.ibatis.annotations.*;

import java.util.List;

@Mapper
public interface PetServiceMapper {

    @Insert("insert into service(real_name,tel,province,city,area,address,door_num,bowl_img,grain_img,water_img,walk,date,create_time,create_user)" +
            "values(#{realName},#{tel},#{province},#{city},#{area},#{address},#{doorNum},#{bowlImg},#{grainImg},#{waterImg},#{walk},#{date},#{createTime},#{createUser})")
    void add(PetService petService);

    List<PetService> list (String username);

    @Select("select * from service where create_user = #{userId}")
    List<PetService> list2(Integer userId);

}
